package com.social.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.social.pojo.dto.UserDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @className: Activity
 * @description: 活动类
 * @author: XiaoXu
 * @date: 2022/10/09 18:47
 **/

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("activity")
@ApiModel("社区活动类")
public class Activity implements Serializable {

    @TableId(value = "id",type = IdType.AUTO)
    @ApiModelProperty("社区活动编号")
    @NotNull(message = "id不能为空",groups = {update.class})
    private Long id;
    /**
        * @Description 社区活动编号
    */

    @ApiModelProperty("活动地点")
    @NotBlank(message = "活动地点不能为空",groups = {add.class})
    private String site;
    /**
        * @Description 活动地点
    */

    @ApiModelProperty("活动总人数")
    @NotNull(message = "活动人数上限不能为空",groups = {add.class})
    private Integer number;
    /**
        * @Description 活动总人数
    */

    @ApiModelProperty("活动已报名人数")
    @NotNull(message = "已报名人数不能为空")
    private Integer register;
    /**
        * @Description 活动报名人数
    */

    @ApiModelProperty("活动主题")
    @NotBlank(message = "活动主题不能为空",groups = {add.class})
    private String title;
    /**
        * @Description 活动主题
    */

    @ApiModelProperty("活动内容")
    @NotBlank(message = "活动内容不能为空",groups = {add.class})
    private String content;
    /**
        * @Description 活动内容
    */

    @ApiModelProperty("负责人id")
    @NotNull(message = "负责人id不能为空",groups = {update.class})
    private Long principalId;
    /**
        * @Description 负责人用户编号
    */

    @ApiModelProperty("活动报名开始时间")
    @NotNull(message = "报名开始时间不能为空",groups = {add.class})
    private LocalDateTime registerDate;


    @ApiModelProperty("活动开始时间")
    @NotNull(message = "活动开始时间不能为空",groups = {add.class})
    private LocalDateTime beginTime;
    /**
        * @Description 活动开始时间
    */

    @ApiModelProperty("活动结束时间")
    @NotNull(message = "活动结束时间不能为空",groups = {add.class})
    private LocalDateTime endTime;
    /**
        * @Description 活动结束时间
    */    
    
    @ApiModelProperty("活动类型")
    @NotNull(message = "活动类型不为空",groups = {add.class})
    private Long speciesNum;
    /**
        * @Description 活动类型
    */
    @TableField(exist = false)
    private String species;

    private LocalDateTime publicTime;

    private String requirement;

    private String hoster;

    private String fileName;
    @ApiModelProperty("负责人信息")
    @TableField(exist = false)
    private UserDTO user;
    /**
        * @Description 负责人信息
    */
    @TableField(exist = false)
    private Integer isRegister;

    @TableField(exist = false)
    private Integer state;

    @TableField(exist = false)
    private Volunteering volunteering;

    public interface add{

    }
    public interface update{

    }

}
